#ifndef MSEVENT_PUSH_H
#define MSEVENT_PUSH_H
#ifdef __cplusplus
   extern "C"{
#endif

typedef enum MSEVENT_LEVEL{
/*注意：只有紧急告警才会被记录到日志文件*/
	eventLevel_emergency_1	=0x100,	//系统异常:运行环境异常
	eventLevel_emergency_2,			//
	eventLevel_emergency_3,			//授权异常
	eventLevel_emergency_4,			//功能异常
	eventLevel_ordinary_1	=0x200,	//功能检测告警：视频检测告警、码流异常告警等；
	eventLevel_ordinary_2,			//普通事件：
	eventLevel_ordinary_3			//低优先级事件：
}MSEVENT_LEVEL;

typedef enum MSEVENT_TYPE{
	eventType_authentException	=0x00,	//系统异常:运行环境异常
	eventType_nicException,				//网卡状态异常
	eventType_cpuLoadException,			//CPU负载异常
	eventType_memException,				//内存占用异常
	eventType_diskException,			//硬盘占用异常
	eventType_timeException,			//系统时间异常
	eventType_heartBeat,				//心跳推送
	eventType_videoQualityMonitoring,	//视频质量监测
}MSEVENT_TYPE;

typedef enum MSEVENTPUSH_TIME{
	eventPush_now	=0x00,	//立即推送
	eventPush_short	,	//快速推送
	eventPush_nor	,	//正常推送
	eventPush_long	,	//长时间推送
	eventPush_max	,	
}MSEVENTPUST_TIME;

typedef struct MSEVENTPUSHContext{
	ms_s32 numGW;
	ms_byte pushUrl[1024];
	ms_bool flag_reach_pushUrl;
}MSEVENTPUSHContext;

#define EVENT_DATA_IMG	"imgId"
#define EVENT_DATA_DES	"desInfo"


#define MSEVP_DEFAULT_DEVID	"msavskit0001"
#define MSEVP_EVENTTYPE_STR \
	"AuthentException", \
	"NicException", \
	"CPULoadException", \
	"MemException", \
	"DiskException", \
	"TimeException", \
	"HeartBeat", \
	"VideoQualityMonitoring"
	
#ifndef MSEVENT_PUSH_C
extern MSEVENTPUSHContext evp_ctt;

extern ms_void 
	msevp_api_eventIn(MSEVENTPUST_TIME timePush,MSEVENT_LEVEL evLevel,ms_string evType,ms_string devId,ms_string dataJson);
ms_void 
	msevp_api_eventIn2(MSEVENT_TYPE eventType,ms_string devId,ms_string dataJson);
extern ms_void 
	msevp_api_createServer(MSEVENTPUSHContext *pEvp_ctt);
#endif

#ifdef __cplusplus
}
#endif
#endif
